package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 
 *
 * @author chenzh
 * @since 2024-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_school_account")
@Schema(name = "EduSchoolAccount", title = "", description = "实体类")
public class EduSchoolAccount extends Model<EduSchoolAccount> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "accountId", description = "主键")
    @TableId(value = "account_id", type = IdType.INPUT)
    private Long accountId;

    @Schema(name = "orgId", description = "学校id")
    @TableField(value = "org_id")
    private String orgId;

    @Schema(name = "schoolName", description = "学校名称")
    @TableField(value = "school_name")
    private String schoolName;

    @Schema(name = "shortName", description = "简称")
    @TableField(value = "short_name")
    private String shortName;

    @Schema(name = "schoolNature", description = "学校性质0.公办 1.民办")
    @TableField(value = "school_nature")
    private String schoolNature;

    @Schema(name = "schoolCategory", description = "学校类别")
    @TableField(value = "school_category")
    private String schoolCategory;

    @Schema(name = "fullName", description = "姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "phone", description = "手机号")
    @TableField(value = "phone")
    private String phone;

    @Schema(name = "areaCode", description = "行政区划")
    @TableField(value = "area_code")
    private String areaCode;

    @Schema(name = "del", description = "0,未删除,1,已删除")
    @TableField(value = "del", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    @TableLogic
    private String del;

    @Schema(name = "createName", description = "创建人")
    @TableField(value = "create_name", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private String createName;

    @Schema(name = "createTime", description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_NULL)
    private Date createTime;

    @Schema(name = "updateName", description = "修改人")
    @TableField(value = "update_name", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private byte[] updateName;

    @Schema(name = "updateTime", description = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE, updateStrategy = FieldStrategy.NOT_NULL)
    private Date updateTime;

    @Override
    public Serializable pkVal() {
        return this.accountId;
    }
}
